<?php

namespace app\common\model;

use app\extra\BaseModel;

class users extends BaseModel
{
    use \think\model\concern\SoftDelete;
    protected $deleteTime = 'delete_time';
    public $listExceptField = ['delete_time','create_time'];
    /**
     * 添加额外参数
     * @param $item
     */
    public function setAddedField(&$item){
        // $item['public_desc'] = \app\extra\DBCont::getPublishStatus($item['publish']);
             $where[]=['openId','=', $item['openId']];
        $item['school_list']= model('enroll')->getList($where);
        $item['my_school'] = model('school')->where('id',$item['my_school'])->value('name');
        $item['collection_num'] = model('collection')->where($where)->count();
    }
}
